//
//  ViewController.m
//  GBMD5
//
//  Created by 郭宝 on 16/8/16.
//  Copyright © 2016年 郭宝. All rights reserved.
//

#import "ViewController.h"
#import "NSString+GBMD5.h"
#import "NSString+SYSHA_1.h"
#import "NSString+SYBase64.h"
#import "NSString+SYDES.h"
@interface ViewController ()

@end

@implementation ViewController   
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
//   MD5 SHA_1单向散列函数
//  MD5  验证算法，一般应用验证密码
    NSString *afterMD5 = @"Hello, 1234567";
    NSString *final32lMD5 = [afterMD5 stringWith32BitMD5Lower];
    NSString *final32uMD5 = [afterMD5 stringWith32BitMD5Upper];
    NSString *final16lMD5 = [afterMD5 stringWith16BitMD5Lower];
    NSString *final16uMD5 = [afterMD5 stringWith16BitMD5Upper];
//    NSLog(@"32小写%@", final32lMD5);
//    NSLog(@"32大写%@", final32uMD5);
//    NSLog(@"16小写%@", final16lMD5);
//    NSLog(@"16大写%@", final16uMD5);
//    2.SHA-1
    NSString *afterSHA_1 = @"HELLO";
    NSString *finalSHAString_1 = [afterSHA_1 stringWithSYSHA_1];
//    NSLog(@"%@",finalSHAString_1);
    
    NSString *afterBase64 = @"jkhjdshj加快了速度就放开来的时间按开发了加快速度就发了肯定就发了肯定是解放路口就算了可点击付款";
    NSString *base64 = [afterBase64 stringWithBase64];
//    NSLog(@"base64-------%@",base64);
    
    NSString *finalString = [base64 Base64StringWith];
//    NSLog(@"%@",finalString);
//    4对称密码
//    三种 算法 DES 3重DES AES
    
    NSString *string = @"123456789";
    NSString *desStr = [string stringWithDES];
//    NSLog(@"DES加密-------%@",desStr);
    NSString *sourceString = [desStr desWithString];
    NSLog(@"%@",sourceString);
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
